<?php
class Session{
      private $request;
      
      private function __construct(){
            session_start();
           
      }
      
      public static function getInstance(){
           if($this!=null)return $this;
          return new Session();  
      }
      
      
      
      public function setRequest($name,$request){
                  $_SESSION[$name]=$request;
      }
      
      
      public function getRequest($name){
            if(!isset($_SESSION[$name]))return null;
            else return $_SESSION[$name];
            
      }
      public function destroySession(){
            session_destroy();
      }
         
}


?>
